<?php
$dbhost = 'localhost';
$dbuser = 'root';
$dbpass = 'root'; 
$conn = mysqli_connect($dbhost, $dbuser, $dbpass);
mysqli_query($conn , "set names utf8");
mysqli_select_db($conn, 'liuyanku');
$sql = 'SELECT username, message from message';
$result = mysqli_query($conn, $sql);
while ($row = mysqli_fetch_assoc($result)) 
{
    echo "<p><strong>{$row['username']}:</strong>{$row['message']}</p>";
}
?>